<!DOCTYPE html>
<html>
<head>
<title>GradientLabTest</title>
<script type="text/javascript" src="libs/three.min.js"></script>
<script type="text/javascript" src="libs/dat.gui.min.js"></script>

<script type="text/javascript" src="GradientLab.js"></script>

<script type="text/javascript">

// http://www.bennyn.de/programmierung/javascript/parameter-mit-javascript-auslesen.html
function getURLParameter(name) {
	  var value = decodeURIComponent((RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [, ""])[1]);
	  return (value !== 'null') ? value : false;
}

function init()
{
	myLab = new CODECO.GradientLab("container");
	
	function gameLoop() {
		//update
		myLab.update();
		
		//render
		requestAnimationFrame(gameLoop);
		myLab.render();
	}
	window.addEventListener("mousemove", CODECO.AppState.mouseMove, false);
	window.addEventListener("mousedown", CODECO.AppState.mousePress, false);
	window.addEventListener("mouseup", CODECO.AppState.mouseRelease, false);
	gameLoop();
}

window.addEventListener("load", init, false);

</script>



</head>
<body>
<h1>Testseite f&uuml;r GradientMapping</h1>

<div id="container"></div>

</body>
</html>